<!-- html -->
<template>
    <h1 class="h1">pinia，集中式数据管理</h1>
    <span class="span1" @click="piniaTest1">pinia</span>
    <hr>
    <RouterView />
</template>

<!-- js或ts -->
<script lang="ts">
export default {
    name: 'piniaHome'
}
</script>

<!-- js或ts -->
<script setup lang="ts">
import { useRouter } from 'vue-router'
//数据
let router = useRouter()
//方法
function piniaTest1() {
    router.push({
        path: '/piniaHome/piniaTest1'
    })
}
</script>

<!-- 样式 -->
<style scoped></style>